package com.lzh.mapper;

import com.lzh.pojo.CE;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Reborn
 * @since 2020-06-15
 */
@Repository
public interface CEMapper extends BaseMapper<CE> {

    @Select("select eid from c_e where cid=#{cid}")
    List<Integer> queryEByC(int id);


    @Delete("delete  from c_e where eid=#{eid}")
    int deleteCEByEid(int id);

    @Delete("delete  from c_e where eid=#{eid} and cid=#{cid}")
    int deleteCEByCE(CE ce);


    @Select("select eid from c_e")
    Set<Integer> queryEid();
}
